/**
 */
package de.nordakademie.hausarbeit.stylesheet.impl;

import de.nordakademie.hausarbeit.stylesheet.GreySubtitle;
import de.nordakademie.hausarbeit.stylesheet.StylesheetPackage;
import de.nordakademie.hausarbeit.stylesheet.Text;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Grey Subtitle</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link de.nordakademie.hausarbeit.stylesheet.impl.GreySubtitleImpl#getTabletext <em>Tabletext</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class GreySubtitleImpl extends BodyImpl implements GreySubtitle
{
  /**
   * The cached value of the '{@link #getTabletext() <em>Tabletext</em>}' reference.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getTabletext()
   * @generated
   * @ordered
   */
  protected Text tabletext;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected GreySubtitleImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected EClass eStaticClass()
  {
    return StylesheetPackage.Literals.GREY_SUBTITLE;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Text getTabletext()
  {
    if (tabletext != null && tabletext.eIsProxy())
    {
      InternalEObject oldTabletext = (InternalEObject)tabletext;
      tabletext = (Text)eResolveProxy(oldTabletext);
      if (tabletext != oldTabletext)
      {
        if (eNotificationRequired())
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, StylesheetPackage.GREY_SUBTITLE__TABLETEXT, oldTabletext, tabletext));
      }
    }
    return tabletext;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Text basicGetTabletext()
  {
    return tabletext;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setTabletext(Text newTabletext)
  {
    Text oldTabletext = tabletext;
    tabletext = newTabletext;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, StylesheetPackage.GREY_SUBTITLE__TABLETEXT, oldTabletext, tabletext));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
      case StylesheetPackage.GREY_SUBTITLE__TABLETEXT:
        if (resolve) return getTabletext();
        return basicGetTabletext();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
      case StylesheetPackage.GREY_SUBTITLE__TABLETEXT:
        setTabletext((Text)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
      case StylesheetPackage.GREY_SUBTITLE__TABLETEXT:
        setTabletext((Text)null);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
      case StylesheetPackage.GREY_SUBTITLE__TABLETEXT:
        return tabletext != null;
    }
    return super.eIsSet(featureID);
  }

} //GreySubtitleImpl
